home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / bsd / rpcsvc / rquota.h < prev    next >
C/C++ Source or Header  |  1990-01-29  |  2KB  |  62 lines

  1. /*    @(#)rquota.h    1.2 88/05/08 4.0NFSSRC SMI    */
  2.  
  3. /* 
  4.  * Copyright (c) 1988 by Sun Microsystems, Inc.
  5.  * @(#) from SUN 1.7
  6.  */
  7.  
  8. /*
  9.  * remote quota inquiry protocol
  10.  */
  11.  
  12. #define RQUOTAPROG    100011
  13. #define RQUOTAVERS_ORIG    1
  14. #define RQUOTAVERS    1
  15.  
  16. /*
  17.  * inquire about quotas for uid (assume AUTH_UNIX)
  18.  *    input - getquota_args            (xdr_getquota_args)
  19.  *    output - getquota_rslt            (xdr_getquota_rslt)
  20.  */
  21. #define RQUOTAPROC_GETQUOTA        1    /* get quota */
  22. #define RQUOTAPROC_GETACTIVEQUOTA    2    /* get only active quotas */
  23.  
  24. /*
  25.  * args to RQUOTAPROC_GETQUOTA and RQUOTAPROC_GETACTIVEQUOTA
  26.  */
  27. struct getquota_args {
  28.     char *gqa_pathp;        /* path to filesystem of interest */
  29.     int gqa_uid;            /* inquire about quota for uid */
  30. };
  31.  
  32. /*
  33.  * remote quota structure
  34.  */
  35. struct rquota {
  36.     int rq_bsize;            /* block size for block counts */
  37.     bool_t rq_active;        /* indicates whether quota is active */
  38.     u_long rq_bhardlimit;        /* absolute limit on disk blks alloc */
  39.     u_long rq_bsoftlimit;        /* preferred limit on disk blks */
  40.     u_long rq_curblocks;        /* current block count */
  41.     u_long rq_fhardlimit;        /* absolute limit on allocated files */
  42.     u_long rq_fsoftlimit;        /* preferred file limit */
  43.     u_long rq_curfiles;        /* current # allocated files */
  44.     u_long rq_btimeleft;        /* time left for excessive disk use */
  45.     u_long rq_ftimeleft;        /* time left for excessive files */
  46. };    
  47.  
  48. enum gqr_status {
  49.     Q_OK = 1,            /* quota returned */
  50.     Q_NOQUOTA = 2,            /* noquota for uid */
  51.     Q_EPERM = 3            /* no permission to access quota */
  52. };
  53.  
  54. struct getquota_rslt {
  55.     enum gqr_status gqr_status;    /* discriminant */
  56.     struct rquota gqr_rquota;    /* valid if status == Q_OK */
  57. };
  58.  
  59. extern bool_t xdr_getquota_args();
  60. extern bool_t xdr_getquota_rslt();
  61. extern bool_t xdr_rquota();
  62.